/* eslint-disable spaced-comment */
/* eslint-disable eqeqeq */
/* eslint-disable comma-dangle */
/* eslint-disable quotes */
/* eslint-disable semi */

import request from "@/utils/request";

//获取品牌列表接口 /admin/product/baseTrademark/{page}/{limit} Get
export const reqTradeMarkList = (page, limit) => {
  return request({
    method: "GET",
    url: `/admin/product/baseTrademark/${page}/${limit}`,
  });
};

//处理添加品牌操作 /admin/product/baseTrademark/save POST
//修改品牌操作  /admin/product/baseTrademark/update PUT
export const reqAddOrUpdateTradeMark = (tradeMark) => {
  if (tradeMark.id) {
    return request({
      method: "PUT",
      url: "/admin/product/baseTrademark/update",
      data: tradeMark,
    });
  } else {
    return request({
      method: "POST",
      url: "/admin/product/baseTrademark/save",
      data: tradeMark,
    });
  }
};

//删除品牌  /admin/product/baseTrademark/remove/{id} DELETE
export const reqDeleteTradeMark = (id) => {
  return request({
    method: "DELETE",
    url: `/admin/product/baseTrademark/remove/${id}`,
  });
};
